package tables

// todo 这里使用硬删除
// db.Unscoped().where("xxx").Find(&xxx)
// 也可以永久删除记录
// db.Unscoped().Delete(&xxx)

type Collect struct {
	GoodsID string `gorm:"type:varchar(10);not null;primary_key"`
	Goods   Goods  `gorm:"foreignKey:GoodsID;"`

	UserID    int32   `gorm:"type:int;not null;primary_key"`
	User      User    `gorm:"foreignKey:UserID;references:ID"`
	CreatedAt *MyTime `gorm:"column:create_time"`
}

func (c *Collect) TableName() string {
	return "collect"
}
